/**
 * 说明：
 * 创建人：pluto
 * 创建时间：2018/8/3
 */
var SettingCtrl = function ($scope,SettingService) {
    $scope.setting = {};
    SettingService.get().then(function (res) {
        $scope.setting = res;
    }, function (err) {
        layer.msg(err.message,{icon: 2});
    });
    $scope.submit = function () {
        SettingService.update($scope.setting).then(function (res) {
            layer.msg("修改成功",{icon: 1});
        },function (err) {
            layer.msg(err.message,{icon: 2});
        });
    }

};

angular.module('app.system.setting.controller',[]).controller("SettingCtrl", SettingCtrl);